package cineplanet.modelo;

import java.io.Serializable;
import javax.persistence.*;
import java.util.Set;


/**
 * The persistent class for the tab_cartelera database table.
 * 
 */
@Entity
@Table(name="tab_cartelera")
public class TabCartelera implements Serializable {
	private static final long serialVersionUID = 1L;

	@EmbeddedId
	private TabCarteleraPK id;

	//bi-directional many-to-one association to TabPelicula
    @ManyToOne
	@JoinColumn(name="PEL_IdPelicula")
	private TabPelicula tabPelicula;

	//bi-directional many-to-one association to TabSala
    @ManyToOne
	@JoinColumns({
		@JoinColumn(name="LOC_IdLocal", referencedColumnName="SAL_IdSala"),
		@JoinColumn(name="SAL_IdSala", referencedColumnName="LOC_IdLocal")
		})
	private TabSala tabSala;

	//bi-directional many-to-one association to TabCompraentrada
	@OneToMany(mappedBy="tabCartelera")
	private Set<TabCompraentrada> tabCompraentradas;

    public TabCartelera() {
    }

	public TabCarteleraPK getId() {
		return this.id;
	}

	public void setId(TabCarteleraPK id) {
		this.id = id;
	}
	
	public TabPelicula getTabPelicula() {
		return this.tabPelicula;
	}

	public void setTabPelicula(TabPelicula tabPelicula) {
		this.tabPelicula = tabPelicula;
	}
	
	public TabSala getTabSala() {
		return this.tabSala;
	}

	public void setTabSala(TabSala tabSala) {
		this.tabSala = tabSala;
	}
	
	public Set<TabCompraentrada> getTabCompraentradas() {
		return this.tabCompraentradas;
	}

	public void setTabCompraentradas(Set<TabCompraentrada> tabCompraentradas) {
		this.tabCompraentradas = tabCompraentradas;
	}
	
}